user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  lea    D8(%rip),%r14
  push   %r13
  mov    $0x3c,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r15
  nopw   0x0(%rax,%rax,1)
L52:
  xor    %eax,%eax
  mov    %r15,%rsi
  lea    D15(%rip),%rdi
  call   <scanf@plt>
  test   %rax,%rax
  jle    L37
  lea    0x10(%rsp),%rdx
  xor    %eax,%eax
  mov    $0xf,%ecx
  xor    %ebx,%ebx
  mov    %rdx,%rdi
  lea    0xb(%rsp),%r12
  lea    0x114(%rsp),%rbp
  rep stos %rax,%es:(%rdi)
  mov    $0xf,%ecx
  movl   $0x0,(%rdi)
  lea    0x90(%rsp),%rdi
  movq   $0x0,0x8c(%rsp)
  movq   $0x0,0x100(%rsp)
  rep stos %rax,%es:(%rdi)
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L55
  nopl   0x0(%rax)
L15:
  mov    %rbp,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  mov    %r12,%rdx
  call   <scanf@plt>
  cmpb   $0x45,0xb(%rsp)
  movsbl 0x115(%rsp),%esi
  movsbl 0x114(%rsp),%edi
  je     L21
  call   <char_to_int@plt>
  add    $0x1,%ebx
  mov    %eax,%r8d
  mov    %r13d,%eax
  sub    %r8d,%eax
  cltq
  addl   $0x1,0x10(%rsp,%rax,4)
  cmp    %ebx,0xc(%rsp)
  jg     L15
L55:
  movdqu 0x8c(%rsp),%xmm0
  movdqa 0x10(%rsp),%xmm1
  movl   $0x0,0xc(%rsp)
  lea    D7(%rip),%rdi
  movdqu 0x8c(%rsp),%xmm4
  movdqa 0x30(%rsp),%xmm3
  pcmpgtd 0x10(%rsp),%xmm0
  mov    0xfc(%rsp),%eax
  movdqu 0x9c(%rsp),%xmm5
  movdqu 0xac(%rsp),%xmm6
  mov    0x80(%rsp),%edx
  movdqu 0xbc(%rsp),%xmm7
  pand   %xmm0,%xmm1
  movdqa %xmm0,%xmm2
  cmp    %edx,%eax
  movdqu 0x9c(%rsp),%xmm0
  pandn  %xmm4,%xmm2
  cmovle %eax,%edx
  movdqu 0xcc(%rsp),%xmm4
  pcmpgtd 0x20(%rsp),%xmm0
  por    %xmm1,%xmm2
  movdqa 0x20(%rsp),%xmm1
  pand   %xmm0,%xmm1
  pandn  %xmm5,%xmm0
  movdqu 0xdc(%rsp),%xmm5
  por    %xmm1,%xmm0
  paddd  %xmm0,%xmm2
  movdqu 0xac(%rsp),%xmm0
  pcmpgtd 0x30(%rsp),%xmm0
  pand   %xmm0,%xmm3
  movdqa %xmm0,%xmm1
  movdqu 0xbc(%rsp),%xmm0
  pandn  %xmm6,%xmm1
  movdqu 0xec(%rsp),%xmm6
  pcmpgtd 0x40(%rsp),%xmm0
  por    %xmm3,%xmm1
  movdqa 0x40(%rsp),%xmm3
  paddd  %xmm2,%xmm1
  pand   %xmm0,%xmm3
  movdqa %xmm0,%xmm2
  movdqu 0xcc(%rsp),%xmm0
  pandn  %xmm7,%xmm2
  pcmpgtd 0x50(%rsp),%xmm0
  por    %xmm3,%xmm2
  movdqa 0x50(%rsp),%xmm3
  paddd  %xmm1,%xmm2
  pand   %xmm0,%xmm3
  movdqa %xmm0,%xmm1
  movdqu 0xdc(%rsp),%xmm0
  pandn  %xmm4,%xmm1
  pcmpgtd 0x60(%rsp),%xmm0
  por    %xmm3,%xmm1
  movdqa 0x60(%rsp),%xmm3
  paddd  %xmm2,%xmm1
  movdqa %xmm0,%xmm2
  pand   %xmm0,%xmm3
  pandn  %xmm5,%xmm2
  por    %xmm3,%xmm2
  movdqa 0x70(%rsp),%xmm3
  paddd  %xmm1,%xmm2
  movdqu 0xec(%rsp),%xmm1
  pcmpgtd 0x70(%rsp),%xmm1
  pand   %xmm1,%xmm3
  pandn  %xmm6,%xmm1
  movdqa %xmm1,%xmm0
  por    %xmm3,%xmm0
  paddd  %xmm2,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  add    %eax,%edx
  mov    0x84(%rsp),%eax
  mov    0x100(%rsp),%ecx
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  mov    0x104(%rsp),%ecx
  add    %eax,%edx
  mov    0x88(%rsp),%eax
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  lea    (%rax,%rdx,1),%esi
  call   <printf@plt>
  jmp    L52
  xchg   %ax,%ax
L21:
  call   <char_to_int@plt>
  add    $0x1,%ebx
  mov    %eax,%r8d
  mov    %r13d,%eax
  sub    %r8d,%eax
  cltq
  addl   $0x1,0x8c(%rsp,%rax,4)
  cmp    0xc(%rsp),%ebx
  jl     L15
  jmp    L55
L37:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x128,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D8
data_type: string
name: retrieve_data
arguments: data_tag: D15
data_type: string
name: retrieve_data
arguments: data_tag: D7
data_type: string

tool: D8: %s %c

tool: D15: %d

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